import C from '#/src/common/common.js'
import S from '#/src/common/store.js'

const Model = 'admin'

const state = {
    userinfo: {
    },
    user: {
    },
    globalceshi: {
    }
}

const mutations = {
    changeUser (state, data) {
        state.userinfo = data
    }
}

const actions = {
    async getAdminUserInfo ({ commit }) {
        let userinfo = await C.ajax('/organization/index/getadmininfo', {}, 'post')
        if (userinfo) {
            console.log(123)
            S.setStore(Model, {userinfo: userinfo})
        }
    }
}

export default {
    namespaced: true,
    state,
    mutations,
    actions
}
